package com.joysuch.wwyt.edu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.edu.bean.EduExamListBean;
import com.joysuch.wwyt.edu.bean.EduExamUserDto;
import com.joysuch.wwyt.edu.bean.EduExamUserScopeDetailBean;
import com.joysuch.wwyt.edu.bean.EduTrainningRecordListBean;
import com.joysuch.wwyt.edu.bean.vo.ExamUserVo;
import com.joysuch.wwyt.edu.entity.EduCourse;
import com.joysuch.wwyt.edu.entity.EduExam;
import com.joysuch.wwyt.edu.entity.EduExamCourse;
import com.joysuch.wwyt.edu.entity.EduTestPaper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import retrofit2.http.PATCH;

import java.util.Date;
import java.util.List;


@Mapper
public interface EduExamMapper extends BaseMapper<EduExam> {
    Page<EduExamListBean> selectNoTrainningExam(Page<EduExam> page,
                                        @Param("searchEduExam") EduExamListBean.SearchEduExam searchEduExam);

    int selectExamCourse(@Param("examId") Long examId);

    List<EduCourse> selectExamCourseDetails(@Param("id") Long id);

    Integer selectExamMode(@Param("examId") Long examId);

    List<EduExamUserDto> getUserRecordName(@Param("examId") Long examId);

    List<EduExamUserDto> getRecordName(@Param("examId") Long examId);

    Page<ExamUserVo> myExamList(Page<EduExam> eduExamPage,
                                @Param("condition") EduTrainningRecordListBean.SearchEduTrainningRecord condition);

    List<EduExam> selectByRecord();

    void updateByExamFrom(@Param("eduExams") List<EduExam> eduExams);

    void updateByTrainType(@Param("exams") List<EduExam> exams);

    List<EduExam> selectExam();

    EduExam selectByFromType();

    List<EduExamCourse> selectExamCourseList(@Param("examId") Long examId);

    int selectPassExam(@Param("currentUserId") Long currentUserId,
                       @Param("examId") Long examId);

    List<EduExamUserScopeDetailBean> selectExamPeople(@Param("id") Long id);

    List<Long> selectTestPaperByExam(@Param("examId") Long examId);


    List<Long> selectUserByExamId(@Param("examId") Long examId);

}
